package com.yz.zookeeperconfigsource;


import com.yz.zookeeperconfigsource.mapper.Order;
import com.yz.zookeeperconfigsource.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class OrderService {

    @Autowired
    private OrderMapper orderMapper;
    @Transactional
    public void insert20(){
        for (int i=0;i<20;i++)
            orderMapper.insert(new Order("zhangsan"+i,i));

    }
}
